#include <stdio.h>
#include "game.h"
void menu()
{
	printf("*****************************\n");
	printf("*******   1. start    *******\n");
	printf("*******   0. exit     *******\n");
	printf("*****************************\n");
	printf("choose please: ");
}
void game()
{
	char mine[hangs][lies];
	char show[hangs][lies];
	InitBoard(mine, hangs, lies, '0');
	InitBoard(show, hangs, lies, '*');
	SetMine(mine, hang, lie);
	PrintBoard(show, hang, lie); 
	PrintBoard(mine, hang, lie);
	FindMine(mine,show, hang, lie);
}
void test()
{		
	int num = 0;
	
	do
	{
		menu();
		scanf_s("%d", &num);
		switch (num)
		{
		case 1:
			printf("game start\n");
			game();
			break;
		case 0:
			printf("game over\n");
			break;
		default:
			printf("choose again\n");
			menu();
			break;
		}
	} 
	while (num);
}
int main()
{
	test();
	
	return 0;
}